from django.urls import path, re_path
from .views import role, menu


urlpatterns = [
    path('role/list/', role.Show.as_view(), name='rbac_role_list'),
    path('role/add/', role.Add.as_view(), name='rbac_role_add'),
    re_path('role/edit/(?P<rid>\d+)/', role.Edit.as_view(), name='rbac_role_edit'),
    re_path('role/del/(?P<rid>\d+)/', role.Del.as_view(), name='rbac_role_del'),
    # path('user/list/', user.Show.as_view(), name='rbac_user_list'),
    # path('user/add/', user.Add.as_view(), name='rbac_user_add'),
    # re_path('user/edit/(?P<uid>\d+)/', user.Edit.as_view(), name='rbac_user_edit'),
    # re_path('user/del/(?P<uid>\d+)/', user.Del.as_view(), name='rbac_user_del'),
    # re_path('user/password/update/(?P<uid>\d+)/', user.PwdUpdate.as_view(), name='rbac_user_pwd_update'),
    path('menu/list/', menu.Show.as_view(), name='rbac_menu_list'),
    path('menu/add/', menu.Add.as_view(), name='rbac_menu_add'),
    re_path('menu/edit/(?P<mid>\d+)/', menu.Edit.as_view(), name='rbac_menu_edit'),
    re_path('menu/del/(?P<mid>\d+)/', menu.Del.as_view(), name='rbac_menu_del'),
    re_path('menu/second/add/(?P<menu_id>\d+)/', menu.AddSec.as_view(), name='rbac_menu_add_sec'),
    re_path('menu/second/edit/(?P<smid>\d+)/', menu.EditSec.as_view(), name='rbac_menu_edit_sec'),
    re_path('menu/second/del/(?P<smid>\d+)/', menu.DelSec.as_view(), name='rbac_menu_del_sec'),
    re_path('permission/add/(?P<sec_menu_id>\d+)/', menu.PerAdd.as_view(), name='rbac_per_add'),
    re_path('permission/edit/(?P<pid>\d+)/', menu.PerEdit.as_view(), name='rbac_per_edit'),
    re_path('permission/del/(?P<pid>\d+)/', menu.PerDel.as_view(), name='rbac_per_del'),
    path('multi/permissions/', menu.multi_permissions, name='rbac_multi_permissions'),
    re_path('multi/permissions/del/(?P<pid>\d+)/', menu.MultiPerDel.as_view(), name='rbac_multi_permissions_del'),
    path('distribute/permission/', menu.DistributePermission.as_view(), name='rbac_distribute_permission')
]
